/*
 *
 *
 */

#ifndef GKT_LANGUAGE_H
#define GKT_LANGUAGE_H

#include "gkt_types.h"

#ifdef __cplusplus
extern "C" {
#endif

#if !defined(GKT_CONFIG_LANG_CHINESE_ENABLE) || GKT_CONFIG_LANG_CHINESE_ENABLE
#define GKT_LANG_CHINESE_ENABLE	1
#else
#define GKT_LANG_CHINESE_ENABLE	0
#endif
#if defined(GKT_CONFIG_LANG_ENGLISH_ENABLE) && GKT_CONFIG_LANG_ENGLISH_ENABLE
#define GKT_LANG_ENGLISH_ENABLE	1
#else
#define GKT_LANG_ENGLISH_ENABLE	0
#endif
#define GKT_LANGUAGE_NUMS	\
	(GKT_LANG_CHINESE_ENABLE + GKT_LANG_ENGLISH_ENABLE)

typedef enum {
#if GKT_LANG_CHINESE_ENABLE
	GKT_LANG_CHINESE,
#endif
#if GKT_LANG_ENGLISH_ENABLE
	GKT_LANG_ENGLISH,
#endif
	GKT_LANG_MAX
} gkt_language_e;

#if (GKT_LANGUAGE_NUMS > 1)

#define LANGUAGE_VALUE_L2(lang_name)	\
	GKT_LANG_##lang_name
#define LANGUAGE_VALUE_L1(lang_name)	\
	LANGUAGE_VALUE_L2(lang_name)
#define LANGUAGE_VALUE(lang_name)	\
	LANGUAGE_VALUE_L1(lang_name)
#ifdef GKT_CONFIG_LANGUAGE_DEFAULT
#define GKT_LANGUAGE_DEFAULT	LANGUAGE_VALUE(GKT_CONFIG_LANGUAGE_DEFAULT)
#elif GKT_LANG_CHINESE_ENABLE
#define GKT_LANGUAGE_DEFAULT	GKT_LANG_CHINESE
#endif	

/* current language selected */
extern gkt_language_e g_language;
#define GKT_LAGNUAGE	g_language

void gkt_language_config(gkt_language_e language);
#else
#define GKT_LAGNUAGE	0
#define gkt_language_config(_language)	do {} while (0)
#endif

#ifdef __cplusplus
}
#endif

#endif	/* GKT_LANGUAGE_H */

